package cn.nexd.location.collector.core;

/**
 * Created by codingfish on 15/9/28.
 */
public class CollectorWrap {

    private Collector collector;

    public CollectorWrap(Collector collector) {
        this.collector = collector;
    }

    public void startCollector() {
        if (collector.checkPermission() && collector.initilazeCollector()) {
            collector.startCollector();
        }
    }

    public void stopCollector() {
        if (collector != null) {
            collector.stopCollector();
        }
    }

    public void destroyCollector() {
        if (collector != null) {
            collector.destroyCollector();
        }
    }
}
